package com.xiecong.controller;

import com.xiecong.pojo.EmpQueryParam;
import com.xiecong.pojo.OperateLog;
import com.xiecong.pojo.PageResult;
import com.xiecong.pojo.Result;
import com.xiecong.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {

    @Autowired
    private LogService logService;

    @RequestMapping("/page")
    public Result pageQuery(EmpQueryParam pageList){
        log.info("分页查询日志列表:{}",pageList);
        PageResult<OperateLog> logPageResult = logService.pageQuery(pageList);
        return Result.success(logPageResult);
    }
}
